<?php
/**
 * Created by PhpStorm.
 * User: Krystal
 * Date: 2018/9/3
 * Time: 18:16
 */

namespace app\common\validate;
use think\Validate;

class Collect extends Validate
{

    protected $rule = [
        [ 'name','require' ,'缺少地址名称'],
        [ 'des','require' ,'缺少地址详细信息'],
        [ 'longitude','require' ,'缺少地址经度'],
        [ 'latitude','require' ,'缺少地址纬度'],
        [ 'type','require' ,'未知地址类型'],
        [ 'rid','require' ,'缺少档案id'],
        [ 'remark','require' ,'备注名称必填'],
        [ 'id','require' ,'缺少收藏id'],
        [ 'sort','require' ,'缺少参数type'],
    ];

    protected $scene = [
        'index'   => ['rid'],
        'save'   => ['name','des','longitude','latitude','type','rid'],
        'update'   => ['id','remark'],
        'del'   => ['id','sort'],
    ];
}